package com.yu.exception;

import com.yu.result.ResponseEnum;

/**
 * @Author: yu
 * @Date: 2022/6/20
 * @Description:
 */
public class MMallException extends RuntimeException{

    private ResponseEnum responseEnum;

    public ResponseEnum getResponseEnum() {
        return responseEnum;
    }

    public void setResponseEnum(ResponseEnum responseEnum) {
        this.responseEnum = responseEnum;
    }

    // 构造器，自定义异常
    public MMallException(ResponseEnum responseEnum) {

        super(responseEnum.getMsg()); //??????????
        this.responseEnum = responseEnum;
    }
}
